import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
 * 退款记录表分页查询
 * @param {查询条件} data
 */
export function listLayOrderRefund(query) {
  return request({
    url: 'business/LayOrderRefund/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增退款记录表
 * @param data
 */
export function addLayOrderRefund(data) {
  return request({
    url: 'business/LayOrderRefund',
    method: 'post',
    data: data,
  })
}
/**
 * 修改退款记录表
 * @param data
 */
export function updateLayOrderRefund(data) {
  return request({
    url: 'business/LayOrderRefund',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取退款记录表详情
 * @param {Id}
 */
export function getLayOrderRefund(id) {
  return request({
    url: 'business/LayOrderRefund/' + id,
    method: 'get'
  })
}

/**
 * 删除退款记录表
 * @param {主键} pid
 */
export function delLayOrderRefund(pid) {
  return request({
    url: 'business/LayOrderRefund/delete/' + pid,
    method: 'POST'
  })
}
// 导出退款记录表
export async function exportLayOrderRefund(query) {
  await downFile('business/LayOrderRefund/export', { ...query })
}
